home *** CD-ROM | disk | FTP | other *** search
Wrap
<%@ Language=VBScript %> <%' (c) Copyright 1999-2004 PaperCut Software Pty. Ltd. %> <!-- #include file="includes/PCCommon.inc" --> <!--#include file="includes/header.inc" --> <% If Request("ReportList") <> "" Then ' Display the report list (nothing else) Sub OutputReportRow(strReportKey, strRowClass, strQueryString) Dim strURL Dim strReportName strReportName = GetText(strReportKey) strURL = "LogReport.asp" If strQueryString <> "" Then strURL = strURL & "?cmdRun=Y&blnShowParams=N&txtTitle=" & Server.URLEncode(strReportName) & "&" & strQueryString End If %> <TR class="<%=strRowClass%>"> <TD><A href="<%=strURL%>"><%=strReportName%></A></TD> <TD><%= GetText(strReportKey & "Desc")%></TD> </TR> <% End Sub %> <H1><%= GetText("QuickReports")%></H1> <h2><%= GetText("PrintReports")%></h2> <TABLE class="webAdmin"> <TR> <TH><%= GetText("ReportName")%></TH> <TH><%= GetText("Description")%></TH> </TR> <% OutputReportRow "TopPrintUsersJobs", "evenRow", "cboUsageType=PrintJobs&cboReportType=SummaryByUser&cboPeriod=PeriodMonth&cboSortBy=PrintJobs" OutputReportRow "TopPrintUsersPages", "oddRow", "cboUsageType=PrintJobs&cboReportType=SummaryByUser&cboPeriod=PeriodMonth&cboSortBy=PagesPrinted" OutputReportRow "BusiestPrintersJobs", "evenRow", "cboUsageType=PrintJobs&cboReportType=SummaryByPrinter&cboPeriod=PeriodMonth&cboSortBy=PrintJobs" OutputReportRow "BusiestPrintersPages", "oddRow", "cboUsageType=PrintJobs&cboReportType=SummaryByPrinter&cboPeriod=PeriodMonth&cboSortBy=PagesPrinted" OutputReportRow "PrintJobsExpensive", "evenRow", "cboUsageType=PrintJobs&cboReportType=Detailed&cboPeriod=PeriodMonth&cboSortBy=Cost" OutputReportRow "PrintJobsBiggest", "oddRow", "cboUsageType=PrintJobs&cboReportType=Detailed&cboPeriod=PeriodMonth&cboSortBy=PagesPrinted" OutputReportRow "CancelledAndNotRefundedJobs", "evenRow", "cboUsageType=PrintJobs&cboReportType=Detailed&cboPeriod=PeriodMonth&cboPrintStatus=CancelledWithNoRefund" OutputReportRow "AdhocReports", "oddRow", "" %> </TABLE> <% If gblnHasNetCharging Then %> <h2><%= GetText("NetReports")%></h2> <TABLE class="webAdmin"> <TR> <TH><%= GetText("ReportName")%></TH> <TH><%= GetText("Description")%></TH> </TR> <% OutputReportRow "TopNetUsersData", "evenRow", "cboUsageType=NetUsage&cboReportType=SummaryByUser&cboPeriod=PeriodMonth&cboSortBy=NetDataUsed" OutputReportRow "TopNetUsersTime", "oddRow", "cboUsageType=NetUsage&cboReportType=SummaryByUser&cboPeriod=PeriodMonth&cboSortBy=NetTimeUsed" OutputReportRow "NetHighestDailyUseData", "evenRow", "cboUsageType=NetUsage&cboReportType=Detailed&cboPeriod=PeriodMonth&cboSortBy=NetDataUsed" OutputReportRow "NetHighestDailyUseTime", "oddRow", "cboUsageType=NetUsage&cboReportType=Detailed&cboPeriod=PeriodMonth&cboSortBy=NetTimeUsed" OutputReportRow "AdhocReports", "evenRow", "" %> <% End If %> </TABLE> <!--#include file="includes/footer.inc" --> <% Response.End End If %> <SCRIPT language="JavaScript"> <!-- var iRepTypeSummaryUser = 0; var iRepTypeSummaryPrinter = 1; var iRepTypeDetailed = 2; function changeUsageType() { try { var usage = document.getElementById("cboUsageType"); var printer = document.getElementById("cboPrinter"); var status = document.getElementById("cboPrintStatus"); var doc = document.getElementById("txtDocument"); var report = document.getElementById("cboReportType"); //alert(usage.selectedIndex); if (usage.selectedIndex == 0) { printer.disabled = false; status.disabled = false; doc.disabled = false; report.options[iRepTypeSummaryPrinter].disabled = false; } else { printer.disabled = true; status.disabled = true; doc.disabled = true; report.options[iRepTypeSummaryPrinter].disabled = true; } } catch (e) { // do not error } return true; } function showParams(bShow) { var d = document.getElementById("divReportParams"); if (bShow) { d.style.display = ""; } else { d.style.display = "none"; } } function submitSearch() { var reportForm = document.getElementById("frmReport"); reportForm.submit(); } function submitSearchForRecord(intRec) { var reportForm = document.getElementById("frmReport"); var startRecord = document.getElementById("inpStartRecord"); startRecord.value = intRec; reportForm.submit(); } function exportToExcel() { var reportForm = document.getElementById("frmReport"); var r = document.getElementById("cmdRun"); r.value = "ExportToExcel" reportForm.submit(); } function toggleShowParams() { var d = document.getElementById("divReportParams") var link = document.getElementById("reportParamLink") var inpShowParams = document.getElementById("inpShowParams") if (d.style.display == "none") { d.style.display = ""; inpShowParams.value = "Y"; link.innerHTML = "<A href=\"javascript:toggleShowParams();\"><%=GetText("HideReportParameters")%></A>"; } else { d.style.display = "none"; inpShowParams.value = "N"; link.innerHTML = "<A href=\"javascript:toggleShowParams();\"><%=GetText("ShowReportParameters")%></A> <A href=\"javascript:exportToExcel();\"><%=GetText("RunReportExcel")%></A>"; } } function init() { changeUsageType(); var inpShowParams = document.getElementById("inpShowParams") if (inpShowParams.value == "N") { toggleShowParams(); } } --> </SCRIPT> <% Dim intMaxRows Dim strReportTitle intMaxRows = 50000 strReportTitle = GetText("AdhocReports") Dim strUsageType Dim strReportType Dim strSortByCol Dim strPeriod Dim strStatus Dim strPrinter Dim strDocument Dim strUsername strUsageType = LCase(Trim(Request("cboUsageType"))) strReportType = LCase(Trim(Request("cboReportType"))) strSortByCol = LCase(Trim(Request("cboSortBy"))) strPeriod = Trim(Request("cboPeriod")) strStatus = Trim(Request("cboPrintStatus")) strPrinter = Trim(Request("cboPrinter")) strDocument = Trim(Request("txtDocument")) strUsername = Trim(Request("txtUsername")) If strStatus = "" Then strStatus = "Printed" End If If Trim(Request("txtTitle")) <> "" Then strReportTitle = Trim(Request("txtTitle")) & " (" & GetText(strPeriod) & ")" ElseIf Request("cmdRun") <> "" Then strReportTitle = GetText(Trim(Request("cboUsageType"))) & " - " & GetText(Trim(Request("cboReportType"))) & " (" & GetText(strPeriod) & ")" End If Sub DisplayPrinterSelect(sName, strSelected) Dim objSettings Dim arrPrinters Set objSettings = Server.CreateObject("PCWebAdmin.PCSettings") arrPrinters = objSettings.GetPrinters() Set objSettings = Nothing Response.Write "<SELECT name=""" & sName & """ id=""" & sName & """>" & vbCRLF Response.Write vbTab & "<OPTION></OPTION>" & vbCRLF Dim i For i = Lbound(arrPrinters) to UBound(arrPrinters) If strSelected = arrPrinters(i) Then Response.Write vbTab & "<OPTION SELECTED>" & Server.HTMLEncode(arrPrinters(i)) & "</OPTION>" & vbCRLF Else Response.Write vbTab & "<OPTION>" & Server.HTMLEncode(arrPrinters(i)) & "</OPTION>" & vbCRLF End If Next Response.Write "</SELECT>" & vbCRLF End Sub Function SQLDateString(dtmDateTime) ' Convert a date to a double. We then have to replace commas with "." to make sure ' we generate valid SQL even in locales where commas are used for the decimal place. ' CStr() formats the number using locale settings and there doesn't appear to be the equivalent ' of the Str() function which does not do locale based formatting SQLDateString = Replace(CStr(CDbl(dtmDateTime)), ",", ".") End Function Sub DisplaySelect(sName, arrItems, strSelected, blnIncludeBlank, strExtraHTML) Response.Write "<SELECT name=""" & sName & """ id=""" & sName & """ " & strExtraHTML & ">" & vbCRLF If blnIncludeBlank Then Response.Write vbTab & "<OPTION></OPTION>" & vbCRLF End If Dim i, s For i = 0 to UBound(arrItems) s = arrItems(i) If strSelected = s Then Response.Write vbTab & "<OPTION value=""" & s & """ SELECTED>" & GetText(s) & "</OPTION>" & vbCRLF Else Response.Write vbTab & "<OPTION value=""" & s & """>" & GetText(s) & "</OPTION>" & vbCRLF End If Next Response.Write "</SELECT>" & vbCRLF End Sub Sub DisplayTextbox(sName, sValue) Response.write "<INPUT name=""" & sName & """ id=""" & sName & """ type=""text"" value=""" & Server.HTMLEncode(sValue) & """ />" End Sub Function EscapeSQLString(s) EscapeSQLString = Replace(s, "'", "''") End Function Function IgnoreField(s) If s = "ID" Then IgnoreField = True ElseIf s = "Refunded" Then IgnoreField = True ElseIf s = "Cancelled" Then IgnoreField = True ElseIf s = "Denied" Then IgnoreField = True Else IgnoreField = False End If End Function Sub DisplayRecordSet(strURL, objRS, lngStartRecord) Dim lngRow Dim lngField Dim strAlign Dim strValue Dim vntValue If not objRS.EOF Then objRS.MoveLast objRS.MoveFirst End If If not objRS.EOF and not objRS.BOF Then objRS.MoveFirst End If If Not objRS.EOF and lngStartRecord > 1 Then objRS.MoveFirst objRS.Move lngStartRecord-1 End If Response.Write "<TABLE width=""100%"" border=""0""><TR><TD align=""right"">" DisplayPageNavigation "javascript:submitSearchForRecord(%intStartRecord%);", lngStartRecord, objRS.RecordCount Response.Write "</TD></TR></TABLE>" Response.Write "<TABLE width=""100%"" class=""webAdmin"">" ' Header Response.Write "<TR>" For lngField = 0 to objRS.Fields.Count - 1 If Not IgnoreField(objRS(lngField).Name) Then Response.Write "<TH>" & GetText(objRS(lngField).Name) & "</TH>" End If Next Response.Write "</TR>" & vbCRLF If objRS.RecordCount = 0 Then Response.Write "<TR><TD colspan=""" & objRS.Fields.Count & """>" Response.Write GetText("ResultsNoData") Response.Write "</TD></TR>" & vbCRLF End If lngRow = 0 Do While Not objRS.EOF and lngRow < mintRECORDS_PER_PAGE Response.Write "<TR class=""" & RowClassHelper(lngRow) & """>" For lngField = 0 to objRS.Fields.Count - 1 if Not IgnoreField(objRS(lngField).Name) Then vntValue = objRS(lngField).Value Select Case objRS.Fields(lngField).Type Case 10 ' Str strAlign = "left" strValue = vntValue Case 7 ' Double strAlign = "right" If IsNull(vntValue) Then vntValue = 0 End If strValue = FormatNumber(vntValue, 2, true, false, true) Case 4 ' Long strAlign = "right" If IsNull(vntValue) Then vntValue = 0 End If strValue = FormatNumber(vntValue, 0, true, false, true) Case 5 ' Currency strAlign = "right" strValue = FormatCredit(vntValue) Case 8 ' Date strAlign = "left" strValue = FormatDateTime(vntValue) Case Else strAlign = "left" strValue = vntValue & " - " & objRS.Fields(lngField).Type End Select Response.Write "<TD align=""" & strAlign & """>" Dim bHasShown bHasShown = False If objRS.Fields(lngField).Name = "Status" Then 'Special formatting for print log status field On Error Resume Next If objRS("UserName") <> "" And objRS("TotalCost") > 0 _ And objRS("ID") > 0 And Not objRS("Refunded") Then If Err.Number = 0 Then DisplayPrintJobStatus strValue, objRS("UserName"), objRS("TotalCost"), objRS("ID"), False, objRS("Cancelled"), objRS("Denied") bHasShown = True End If Err.Clear End If On Error Goto 0 End If If Not bHasShown Then Response.Write strValue End If Response.Write "</TD>" End If Next Response.Write "</TR>" & vbCRLF lngRow = lngRow + 1 objRS.MoveNext Loop Response.Write "</TABLE>" Response.Write "<TABLE width=""100%"" border=""0""><TR><TD align=""right"">" DisplayPageNavigation "javascript:submitSearchForRecord(%intStartRecord%);", lngStartRecord, objRS.RecordCount Response.Write "</TD></TR></TABLE>" End Sub %> <H1><% = strReportTitle %></H1> <p> <A href="LogReport.asp?ReportList=Y"><%= GetText("QuickReports") %></A> <SPAN id="reportParamLink"><A href="javascript:toggleShowParams();"><%= GetText("HideReportParameters") %></A></SPAN> </p> <DIV id="divReportParams"> <FORM ACTION="LogReport.asp" METHOD="POST" ID="frmReport"> <INPUT id="cmdRun" name="cmdRun" type="hidden" value="Y"> <INPUT id="inpShowParams" name="blnShowParams" type="hidden" value="<%=Request("blnShowParams")%>"> <INPUT id="inpStartRecord" name="intStartRecord" type="hidden" value=""> <TABLE class="webAdmin" width="500"> <TR class="<%=RowClassHelper(1)%>" > <TH width="30%"><%=GetText("UsageType")%>:</TH> <TD width="70%"><% If gblnHasNetCharging Then DisplaySelect "cboUsageType", Array("PrintJobs","NetUsage"), Request("cboUsageType"), False, " onchange=""changeUsageType();"" " Else DisplaySelect "cboUsageType", Array("PrintJobs"), Request("cboUsageType"), False, " onchange=""changeUsageType();"" " End If %></TD> </TR> <TR class="<%=RowClassHelper(1)%>"> <TH><%=GetText("ReportType")%>:</Th> <TD align="left"><% DisplaySelect "cboReportType", Array("SummaryByUser", "SummaryByPrinter", "Detailed"), Request("cboReportType"), False, "" %></TD> </TR> <TR class="<%=RowClassHelper(0)%>"> <TD colspan="2"><B><%=GetText("ReportFilters")%>:</B></TD> </TR> <TR class="<%=RowClassHelper(1)%>"> <TH><%=GetText("Period")%>:</Th> <TD align="left"><% DisplaySelect "cboPeriod", Array("PeriodAll", "PeriodToday", "PeriodYesterday", "PeriodLast24Hours", "PeriodWeek", "PeriodMonth", "Period3Months", "Period6Months"), Request("cboPeriod"), False, "" %></TD> </TR> <TR class="<%=RowClassHelper(1)%>"> <TH><%=GetText("Username")%>:</Th> <TD align="left"><% DisplayTextbox "txtUsername", Request("txtUsername") %></TD> </TR> <TR class="<%=RowClassHelper(1)%>"> <TH><%=GetText("Printer")%>:</Th> <TD align="left"><% DisplayPrinterSelect "cboPrinter", Request("cboPrinter") %></TD> </TR> <TR class="<%=RowClassHelper(1)%>"> <TH><%=GetText("PrintStatus")%>:</Th> <TD align="left"><% DisplaySelect "cboPrintStatus", Array("Printed", "Denied", "Cancelled", "Refunded", "CancelledWithNoRefund", "AllDocuments"), Request("cboPrintStatus"), False, "" %></TD> </TR> <TR class="<%=RowClassHelper(1)%>"> <TH><%=GetText("Document")%>:</Th> <TD align="left"><% DisplayTextbox "txtDocument", Request("txtDocument") %></TD> </TR> <TR class="<%=RowClassHelper(0)%>"> <TD colspan="2"><B><%=GetText("ReportSortOrder")%>:</B></TD> </TR> <TR class="<%=RowClassHelper(1)%>"> <TH><%=GetText("SortBy")%>:</Th> <TD align="left"><% If gblnHasNetCharging Then DisplaySelect "cboSortBy", Array("Time", "Username", "Printer", "PrintJobs", "PagesPrinted", "PagesPerJob", "Cost", "NetTimeUsed", "NetDataUsed"), Request("cboSortBy"), False, "" Else DisplaySelect "cboSortBy", Array("Time", "Username", "Printer", "PrintJobs", "PagesPrinted", "PagesPerJob", "Cost"), Request("cboSortBy"), False, "" End If %></TD> </TR> <TR > <TD colspan="2" align="right"> <INPUT type="submit" name="cmdRunButton" value="<%=GetText("RunReport")%>"> <INPUT type="button" onclick="exportToExcel();" value="<%=GetText("RunReportExcel")%>"> </TD> </TR> </TABLE> </FORM> </DIV> <% If Request("cmdRun") <> "" Then Dim blnGroupByQuery Dim strValidSorts Dim strDateCol Dim strSQL Dim strWhere Dim strOrderBy Dim strURL strURL = "LogReport.asp?cboUsageType=" & Request("cboUsageType") & "&cboReportType=" & Request("cboReportType") & "&cboSortBy=" & Request("cboSortBy") & "&txtUsername=" & Request("txtUsername") & "&txtDocument=" & Request("txtDocument") & "&cboPrintStatus=" & Request("cboPrintStatus") & "&cboPrinter=" & Request("cboPrinter") & "&cboPeriod=" & Request("cboPeriod") & "&blnShowParams=" & Request("blnShowParams") & "&txtTitle=" & Request("txtTitle") & "&cmdRun=Go" blnGroupByQuery = False If strUsageType = "printjobs" Then 'Print Jobs strDateCol = "[time]" If strReportType = "detailed" Then strSQL = "SELECT top " & intMaxRows & " [Time], Username, PrinterName as Printer, DocumentName as Document, pages as PagesPrinted, Cost as TotalCost, Status, ID, Refunded, Cancelled, Denied FROM JobLog WHERE 1 = 1 ##WHERE## ORDER BY ##ORDERBY## [time] desc, username asc" strValidSorts = "time,username,printername,documentname,pages,cost,status" ElseIf strReportType = "summarybyuser" Then strSQL = "SELECT top " & intMaxRows & " Username, CLng(SUM(pages)) as PagesPrinted, COUNT(*) as PrintJobs, AVG(pages) as PagesPerJob, SUM(cost) as TotalCost FROM JobLog WHERE 1 = 1 ##WHERE## GROUP BY username ORDER BY ##ORDERBY## username asc" strValidSorts = "username,clng(sum(pages)),avg(pages),count(*),sum(cost)" blnGroupByQuery = True ElseIf strReportType = "summarybyprinter" Then strSQL = "SELECT top " & intMaxRows & " PrinterName, CLng(SUM(pages)) as PagesPrinted, COUNT(*) as PrintJobs, AVG(pages) as PagesPerJob, SUM(cost) as TotalCost FROM JobLog WHERE 1 = 1 ##WHERE## GROUP BY printername ORDER BY ##ORDERBY## printername asc" strValidSorts = "printername,CLng(SUM(pages)),avg(pages),count(*),sum(cost)" blnGroupByQuery = True End If Else 'Net usage If Not gblnHasNetCharging Then RedirectWithMessage "LogReport.asp", GetText("ReportsNoNetCharging") End If strDateCol = "[logDate]" If strReportType = "detailed" Then strSQL = "SELECT top " & intMaxRows & " logdate as [Time], Username, totalmb as NetDataUsed, totalnethours as NetTimeUsed, Cost as TotalCost FROM NetChargeLog WHERE 1 = 1 ##WHERE## ORDER BY ##ORDERBY## logdate desc, username asc" strValidSorts = "logdate,username,totalmb,totalnethours,cost" If strSortByCol = "time" Then strSortByCol = "logdate" End If ElseIf strReportType = "summarybyuser" or strReportType = "summarybyprinter" Then strSQL = "SELECT top " & intMaxRows & " Username, SUM(totalmb) as NetDataUsed, SUM(totalnethours) as NetTimeUsed, SUM(cost) as TotalCost FROM NetChargeLog WHERE 1 = 1 ##WHERE## GROUP BY username ORDER BY ##ORDERBY## username asc" strValidSorts = "username,sum(totalmb),sum(totalnethours),sum(cost)" blnGroupByQuery = True End If End If If strUsername <> "" Then strWhere = strWhere & " AND UserName LIKE '*" & EscapeSQLString(strUsername) & "*' " End If If strUsageType = "printjobs" and strPrinter <> "" Then strWhere = strWhere & " AND PrinterName = '" & EscapeSQLString(strPrinter) & "' " End If If strUsageType = "printjobs" Then If strStatus = "Cancelled" Then strWhere = strWhere & " AND Cancelled = True " ElseIf strStatus = "Refunded" Then strWhere = strWhere & " AND Refunded = True " ElseIf strStatus = "CancelledWithNoRefund" Then strWhere = strWhere & " AND Cancelled = True AND Refunded = False " ElseIf strStatus = "AllDocuments" Then strWhere = strWhere & " " Else strWhere = strWhere & " AND Status LIKE '*" & strStatus &"*' " End If End If If strUsageType = "printjobs" and strDocument <> "" Then strWhere = strWhere & " AND DocumentName LIKE '*" & EscapeSQLString(strDocument) & "*' " End If If strPeriod <> "" Then Dim dtmStartDate Dim dtmEndDate ' A date in the future so we get all data by default. dtmEndDate = DateAdd("D", +10, Date) Select Case strPeriod Case "PeriodToday" dtmStartDate = Date Case "PeriodYesterday" dtmStartDate = DateAdd("D", -1, Date) dtmEndDate = Date ' 12am this morning Case "PeriodLast24Hours" ' Subtract a day from now. dtmStartDate = DateAdd("D", -1, Now) Case "PeriodWeek" dtmStartDate = DateAdd("D", -7, Date) Case "PeriodMonth" dtmStartDate = DateAdd("M", -1, Date) Case "Period3Months" dtmStartDate = DateAdd("M", -3, Date) Case "Period6Months" dtmStartDate = DateAdd("M", -6, Date) Case "PeriodAll" ' no restriction End Select If dtmStartDate <> 0 Then strWhere = strWhere & " AND " & strDateCol & " >= " & SQLDateString(dtmStartDate) & " AND " & strDateCol & " <= " & SQLDateString(dtmEndDate) & " " End If End If If strSortByCol <> "" Then Dim strSortOrder Select Case strSortByCol Case "username" strSortOrder = "ASC" Case "printer" strSortOrder = "ASC" Case Else strSortOrder = "DESC" End Select If blnGroupByQuery Then Select Case strSortByCol Case "cost" strSortByCol = "SUM(Cost)" Case "printjobs" strSortByCol = "COUNT(*)" Case "pagesprinted" strSortByCol = "clng(sum(pages))" Case "pagesperjob" strSortByCol = "avg(pages)" Case "days" strSortByCol = "COUNT(*)" Case "nettimeused" strSortByCol = "SUM(totalnethours)" Case "netdataused" strSortByCol = "SUM(totalmb)" Case "printer" strSortByCol = "printerName" End Select Else Select Case strSortByCol Case "pagesprinted" strSortByCol = "pages" Case "nettimeused" strSortByCol = "totalnethours" Case "netdataused" strSortByCol = "totalmb" Case "printer" strSortByCol = "printerName" 'Case Else ' strSortCol = "[" & strSortCol & "]" End Select End If 'Response.write strValidSorts & "<BR>" 'Response.write strSortByCol & "<BR>" If InStr(1, "," & strValidSorts & ",", "," & strSortByCol & ",", vbTextCompare) > 0 Then strOrderBy = strOrderBy & strSortByCol & " " & strSortOrder & ", " End if End If strSQL = Replace(strSQL, "##WHERE##", strWhere) strSQL = Replace(strSQL, "##ORDERBY##", strOrderBy) Response.Write "<!--" & strSQL & "-->" 'Response.End Dim objRS Dim objReports Set objReports = Server.CreateObject("PCWebAdmin.PCReports") If strUsageType = "netusage" Then Set objRS = objReports.QueryNetLog(strSQL) Else Set objRS = objReports.QueryPrintLog(strSQL) End If Set objReports = Nothing If Request("cmdRun") = "ExportToExcel" Then ExportToExcel "UsageReport", objRS, True Response.End End If Dim intStartRecord If Request("intStartRecord") = "" then intStartRecord = 1 Else intStartRecord = Int(Request("intStartRecord")) End If DisplayRecordSet strURL, objRS, intStartRecord objRS.Close Set objRS = Nothing End If %> <SCRIPT language="javascript"> try { init(); } catch (e) { } </SCRIPT> <!--#include file="includes/footer.inc" -->